package com.youlai.boot.config;

import com.youlai.boot.config.property.*;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ConfigBeanConfiguration {
    /**
     * 阿里云短信配置
     * @return /
     */
    @Bean
    @ConfigurationProperties(prefix = "sms.aliyun")
    public AliyunSmsProperties aliyunSmsProperties() {
        return new AliyunSmsProperties();
    }

    /**
     * 验证码 属性配置
     * @return /
     */
    @Bean
    @ConfigurationProperties(prefix = "captcha")
    public CaptchaProperties captchaProperties() {
        return new CaptchaProperties();
    }

    /**
     * 代码生成配置属性
     * @return /
     */
    @Bean
    @ConfigurationProperties(prefix = "codegen")
    public CodegenProperties codegenProperties() {
        return new CodegenProperties();
    }

    /**
     * 邮件配置类，用于接收和存储邮件相关的配置属性。
     * @return /
     */
    @Bean
    @ConfigurationProperties(prefix = "spring.mail")
    public MailProperties mailProperties() {
        return new MailProperties();
    }

    /**
     * 安全配置属性
     */
    @Bean
    @ConfigurationProperties(prefix = "security")
    public SecurityProperties securityProperties() {
        return new SecurityProperties();
    }
}
